package com.yvtian.inv.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yvtian.inv.pojo.InvOrderShopEntity;
import com.yvtian.inv.dao.InvOrderShopMapper;
import com.yvtian.inv.service.InvOrderShopService;
import com.yvtian.utils.StringHelper;
import org.springframework.stereotype.Service;

/**
 * 生产订单物料需求明细(inv_order_shop)表服务实现类
 *
 * @author long
 * @since 2024-07-02 13:43:40
 */
@Service("invOrderShopService")
public class InvOrderShopServiceImpl extends ServiceImpl<InvOrderShopMapper, InvOrderShopEntity> implements InvOrderShopService {

    @Override
    public IPage<InvOrderShopEntity> findByPage(Page<InvOrderShopEntity> page, InvOrderShopEntity invOrderShopEntity) {
        LambdaQueryWrapper<InvOrderShopEntity> queryWrapper = new LambdaQueryWrapper<>();
        if (StringHelper.isNotEmpty(invOrderShopEntity.getZcode())){
            queryWrapper.eq(InvOrderShopEntity::getZcode,invOrderShopEntity.getZcode());
        }
        return this.page(page, queryWrapper);
    }
}

